package com.tony.mindhr.utils;

import com.tony.mindhr.model.Hr;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: HrUtils
 * @Auther: 皮蛋布丁
 * @Date: 2021/06/06/22:21
 * @Description:
 */
public class HrUtils {
    public static Hr getCurrentHr() {
        return ((Hr) SecurityContextHolder.getContext().getAuthentication().getPrincipal());
    }
}
